#define _CRT_SECURE_NO_WARNINGS 1

#include"Sort.h"

void Print(int* nums, int sz)
{
	for (int i = 0; i < sz; i++)
	{
		printf("%d ", nums[i]);
	}
	printf("\n");
}
int main()
{
	srand((unsigned int)time(NULL));
	int N = 19;
	int* a1 = (int*)malloc(N * sizeof(int));
	int* a2 = (int*)malloc(N * sizeof(int));
	int* a3 = (int*)malloc(N * sizeof(int));
	int* a4 = (int*)malloc(N * sizeof(int));
	int* a5 = (int*)malloc(N * sizeof(int));
	int* a6 = (int*)malloc(N * sizeof(int));
	int* a7 = (int*)malloc(N * sizeof(int));

	for (int i = 0; i < N; i++)
	{
		a1[i] = rand();
		a2[i] = a1[i];
		a3[i] = a1[i];
		a4[i] = a1[i];
		a5[i] = a1[i];
		a6[i] = a1[i];
		a7[i] = a1[i];
	}

	InsertSort(a1, N);
	ShellSort(a2, N);
	SelectSort(a3, N);
	HeapSort(a4, N);
	BubbleSort(a5, N);
	QuickSort(a6, 0, N - 1);
	MergeSort(a7, 0, N - 1);

	Print(a1, N);
	Print(a2, N);
	Print(a3, N);
	Print(a4, N);
	Print(a5, N);
	Print(a6, N);
	Print(a7, N);

#if 0;
	int arr[] = {5,5,5,9,3,2,5 };
	QuickSort(arr, 0, 6);
	Print(arr, 7);
#endif

	return 0;
}